<?php include APPLICATION_PATH . '/modules/default/layouts/scripts/content-outer-start.phtml'; ?>
<script>    
    
$(document).ready(function() {
    Calendar.setup({
        weekNumbers: true, //display week number
        inputField: ngaysinh, //id of element that is filled by jcal2 
        trigger: ngaysinh_trigger, //id of element that triggers jcal2
        onSelect: function() { //action occurs when user picks a date
            this.hide();
        },
        showTime: 24, //24 hrs mode
        dateFormat: "%d/%m/%Y %H:%M:00"
    });
    var trigger = document.getElementsByClassName("trigger");
    for (var i = 0; i < trigger.length; i++) {
        trigger[i].addEventListener("click", function(e) {
            e.preventDefault();
        }, false);
    }
 });
    
</script>
<div align="center">
    <form id="mainform" action="<?php echo $this->baseUrl . '/default/nhapdaily/index' ?>" method="post">
        <div class="form_row">
            
            <div class="form_row">
                <div class="label_name_1"><label for="owner" class="label_css">Mã số đại diện</label> </div>
                <div class="float_l">
                    <input type="text" name="dailycha" class="input_css" placeholder="Nhập chính xác mã số người đại diện">
                </div>
            </div>
            
            <div class="form_row">
                <div class="label_name_1"><label for="owner" class="label_css">Mã số phụ</label> </div>
                <div class="float_l">
                    <input type="text" name="masophu" class="input_css" placeholder="Nhập mã số phụ nếu có">
                </div>
            </div>
            
            <div class="form_row" style="display: none">
                <div class="label_name_1"><label for="owner" class="label_css">Loại đại lý</label> </div>
                <div class="float_l">
                    <select name="loaidaily" class="select_css" style="background-color: #FFFFFF">
                        <?php
                        if ($this->loaidaily) {
                            foreach ($this->loaidaily as $loai) {
                                echo '<option value="' . $loai['MaLoaiDaiLy'] . '">' . $loai['TenLoaiDaiLy'] . '</option>';
                            }
                        }
                        ?>
                    </select>
                </div>
            </div>
            
            <div class="form_row">
                <div class="label_name_1"><label for="owner" class="label_css">Tên khách hàng</label> </div>
                <div class="float_l">
                    <input type="text" name="tendaily" class="input_css" placeholder="Tên khách hàng">
                </div>
            </div>
            
            
            <div class="form_row">
                <div class="label_name_1"><label for="owner" class="label_css">Ngày sinh</label> </div>
                <div class="float_l">
                    <input type="text"  id="ngaysinh" name="ngaysinh" readonly="readonly" class="input_css" placeholder="Ngày sinh">
                </div>
                <div class="float_l">
                    <a href="#" id="ngaysinh_trigger" class="calendar trigger"></a>
                </div>
            </div>
            
            <div class="form_row">
                <div class="label_name_1"><label for="owner" class="label_css">Chứng minh nhân dân</label> </div>
                <div class="float_l">
                    <input type="text" name="cmnd" class="input_css" placeholder="Số chứng minh nhân dân">
                </div>
            </div>
            
            <div class="form_row">
                <div class="label_name_1"><label for="owner" class="label_css">Số điện thoại</label> </div>
                <div class="float_l">
                    <input type="text" name="sdt" class="input_css" placeholder="Số điện thoại liên lạc">
                </div>
            </div>
            
            <div class="form_row">
                <div class="label_name_1"><label for="owner" class="label_css">Địa chỉ</label> </div>
                <div class="float_l">
                    <input type="text" name="diachi" class="input_css" placeholder="Địa chỉ liên lạc">
                </div>
            </div>

            <div class="form_row" align="center">
                <input type="submit" id="save" value="Nhập" class="button gray">
            </div>
            
            <div><?php echo $this->message ?></div>
        </div>
    </form>
</div>
<?php include APPLICATION_PATH . '/modules/default/layouts/scripts/content-outer-end.phtml'; ?>